Skip to content

Conversation

ryzhak
Copy link
Contributor

@ryzhak ryzhak commented Jul 1, 2025

This PR adds a new test-coverage script to makefile which runs unit/doc tests and generates an html report locally in the target/llvm-cov/html folder.

This way it's easier to see parts of code which could be better covered with tests.

Notice that the displayed line coverage right now is 62.28% but that's not an accurate value because llvm-cov counts all unit tests in mod tests modules as uncovered code. Those unit tests should be manually excluded from the coverage report (which could be a part of another issue if collecting test coverage lies within the project vision):

#[cfg(test)]
#[cfg_attr(coverage_nightly, coverage(off))]
mod tests {
    // ...
}

@mattsse mattsse requested a review from 0xrusowsky as a code owner August 25, 2025 13:42
@DaniPopes DaniPopes enabled auto-merge (squash) August 25, 2025 13:44
@DaniPopes DaniPopes merged commit 5c99c90 into foundry-rs:master Aug 25, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this to Done in Foundry Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants